from rest_framework import serializers
from ..models import Submit_ZhuangBei,jineng_attrs,jineng,zhuangbei,renwu_zhuangbei,renwu_jieng

class Submit_ZhuangBeiSerializer(serializers.ModelSerializer):
    class Meta:
        model = Submit_ZhuangBei   # 要序列化的模型
        fields = '__all__'   # 要序列化的字段

class Jineng_Attrs_Serializer(serializers.ModelSerializer):
    class Meta:
        model = jineng_attrs   # 要序列化的模型
        fields = '__all__'   # 要序列化的字段

class Jineng_Serializer(serializers.ModelSerializer):
    class Meta:
        model = jineng   # 要序列化的模型
        fields = ["pk",'zhiye_name','name','attrs_content']   # 要序列化的字段

class ZhuangBei_Serializer(serializers.ModelSerializer):
    class Meta:
        model = zhuangbei   # 要序列化的模型
        fields = ["pk",'name','leixing','type_name','attrs_content']   # 要序列化的字段


class RW_ZB_Serializer(serializers.ModelSerializer):
    class Meta:
        model = renwu_zhuangbei   # 要序列化的模型
        fields =  '__all__'  # 要序列化的字段


class RW_JN_Serializer(serializers.ModelSerializer):
    class Meta:
        model = renwu_jieng  # 要序列化的模型
        fields = '__all__'  # 要序列化的字段



